import loaddata from "./loaddata.js";
import render from "./render.js";
import fangdajing from "./Magnifier.js";

export default function () {
      'use strict';
      let $center = $(".center");
      let id = location.hash.substring(1);
      loaddata.init.done(res => {
            $.each(res.goods_list, (index, item) => {
                  if (item.goods_id == id) {
                        let html = render.init(item);
                        $center.html(html);
                        return false;
                  }
            })
            new fangdajing().init();
      })
};